package service;

import java.io.File;

import dao.studentworkdao.StudentWorkDao;
import dao.studentworkdao.StudentWorkDaoImpl;
import model.StudentWork;
import util.Upload;
public class submitWorkService {
    public void submitWork(StudentWork submit,File file,String savePath,String FileName) throws Exception{
    	
    	 StudentWorkDao stuworkdao=new  StudentWorkDaoImpl();
    	 stuworkdao.save(submit);
    	 Upload.uploadFile(file, savePath, FileName);
    }
    public String querysubmitState(int work_id,String stu_id) throws Exception{
    	String submitstate="no";
    	StudentWorkDao stuworkdao=new  StudentWorkDaoImpl();
    	submitstate=stuworkdao.querysubmitState(work_id, stu_id);
    	return submitstate;
    }
}
